Conversation
| "updateLineHighlight: removing highlighting in " + editor.document.fileName); | ||
| editor.setDecorations(nextLineExecuteHighlightType, []); | ||
| } else if (editor.document.lineCount < traceLine) { | ||
| // How can it be that traceLine is out of range? |
There was a problem hiding this comment.
The document/source file might have changed since the visualization was computed. If we start the visualization and remove all content from the source file, we need to remove the line highlighting.
|
|
||
| // State Types for the Frontend | ||
| type FrontendTrace = Array<FrontendTraceElem>; | ||
| // FIXME: what are this array elements? Why isn't there a type with named fields? |
There was a problem hiding this comment.
See generateHTML in HTMLGenerator.ts: it corresponds to a single rendered visualization step. It has the following elements:
- Line number
- the stack rendered as an HTML fragment
- the heap rendered as an HTML fragment
- current filename
- the current state of the output
I don't know why there isn't a type with named fields. It was already solved this way before I integrated the visualization into the WYPP plugin and to be honest, I just did not fix it because it already worked and my main main focus was to get everything working.
|
|
||
| if (nextLine > -1) { | ||
| this.setEditorDecorations(editor, nextLineExecuteHighlightType, nextLine); | ||
| const hlLine = traceLine - 1; // why - 1 |
There was a problem hiding this comment.
traceLine is one-based, VSCode works with zero-based line indices though.
| "updateLineHighlight: highlighting line " + hlLine + " in " + editor.document.fileName); | ||
| this.setEditorDecorations(editor, nextLineExecuteHighlightType, hlLine); | ||
| } else { | ||
| // how can this happen? |
There was a problem hiding this comment.
I'm not sure. Maybe there was a way that this could happen back when the trace was generated though the Debug Adapter Protocol. I don't know why this should happen with the current trace generator. I probably left it there, just in case...
|
Danke @hannesbraun Ich hab ein paar Dinge gefixt, hoffentlich auch den Bug. 100% reproduzieren konnte ich ihn nicht. |
No description provided.